package com.elite.service;

import com.elite.dao.GoodsorderMapper;
import com.elite.entity.Goodsorder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/2/20.
 */
@Service("GoodsorderService")
public class GoodsorderServiceImp implements GoodsorderService {

    @Autowired
    private GoodsorderMapper goodsorderMapper;

    @Override
    public void addGoodsorder(Goodsorder goodsorder) {
        goodsorderMapper.insert(goodsorder);

    }

    @Override
    public List selectByUserId(Integer userId) {
        return goodsorderMapper.selectByUserId(userId);
    }

    @Override
    public List selectBySellerId(Integer sellerId) {
        return goodsorderMapper.selectBySellerId(sellerId);
    }

    @Override
    public Goodsorder selectByPrimaryKey(Integer goodsorderId) {
        return goodsorderMapper.selectByPrimaryKey(goodsorderId);
    }

    @Override
    public void updateStatus(Goodsorder goodsorder) {
        goodsorderMapper.updateStatus(goodsorder);
    }
}
